package com.atguigu.lease.web.admin.service.impl;

import com.atguigu.lease.model.entity.AttrKey;
import com.atguigu.lease.web.admin.mapper.AttrKeyMapper;
import com.atguigu.lease.web.admin.service.AttrKeyService;
import com.atguigu.lease.web.admin.vo.attr.AttrKeyVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 芦博
* @description 针对表【attr_key(房间基本属性表)】的数据库操作Service实现
* @createDate 2025 年 11 月 1 日 
*/
@Service
public class AttrKeyServiceImpl extends ServiceImpl<AttrKeyMapper, AttrKey>
    implements AttrKeyService{
    
    @Autowired
    private AttrKeyMapper attrKeyMapper;

    @Override
    public List<AttrKeyVo> listAttrInfo() {
        List<AttrKeyVo> arr = attrKeyMapper.listAttrInfo();
        return arr;
    }
    
    /**
     * 保存或更新属性键
     * @param attrKey 属性键对象
     */
    @Override
    public void saveOrUpdateAttrKey(AttrKey attrKey) {
        this.saveOrUpdate(attrKey);
    }
}